package com.micro.modual.extension;

import com.micro.common.MicroConstant;
import com.micro.common.biz.GeneratorCodeUtil;
import com.micro.common.util.SnowFlakeUtil;
import com.micro.modual.entity.UserNoticeConfig;
import com.micro.modual.model.bo.usernoticeconfig.UserNoticeConfigBO;

/**
 * <h1>用户通知配置表 延展类</h1>
 * @author LevelCoder
 * @version V1.0.0
 * @email LevelCoder@126.com
 * @date 2020-08-04 00:23:26
 */
public class UserNoticeConfigExtension {

    /**
     * <h2>转换: 用户通知配置表 新增</h2>
     * @param userNoticeConfigBO {@link UserNoticeConfigBO} 用户通知配置表 新增/修改 请求对象
     * @return {@link UserNoticeConfig} 用户通知配置表
     */
    public static UserNoticeConfig converAddUserNoticeConfig(UserNoticeConfigBO userNoticeConfigBO) {
        UserNoticeConfig userNoticeConfig = new UserNoticeConfig();
        userNoticeConfig.setId(SnowFlakeUtil.getId());
                                                            userNoticeConfig.setUserCode(userNoticeConfigBO.getUserCode());
                                                    userNoticeConfig.setOrderNoticeStatus(userNoticeConfigBO.getOrderNoticeStatus());
                                                    userNoticeConfig.setServerNoticeStatus(userNoticeConfigBO.getServerNoticeStatus());
                                                    userNoticeConfig.setAccountNoticeStatus(userNoticeConfigBO.getAccountNoticeStatus());
                                                    userNoticeConfig.setLogisticsNoiceStatus(userNoticeConfigBO.getLogisticsNoiceStatus());
                                                    userNoticeConfig.setMemberNoticeStatus(userNoticeConfigBO.getMemberNoticeStatus());
                                                    userNoticeConfig.setActivityNoticeStatus(userNoticeConfigBO.getActivityNoticeStatus());
                                                    userNoticeConfig.setCreateTime(userNoticeConfigBO.getCreateTime());
                                                    userNoticeConfig.setUpdateTime(userNoticeConfigBO.getUpdateTime());
                            return userNoticeConfig;
    }

    /**
     * <h2>转换: 用户通知配置表 修改</h2>
     * @param userNoticeConfigBO {@link UserNoticeConfigBO} 用户通知配置表 新增/修改 请求对象
     * @return {@link UserNoticeConfig} 用户通知配置表
     */
    public static UserNoticeConfig converEditUserNoticeConfig(UserNoticeConfigBO userNoticeConfigBO) {
        UserNoticeConfig userNoticeConfig = new UserNoticeConfig();
        userNoticeConfig.setId(userNoticeConfigBO.getId());
                                                        userNoticeConfig.setUserCode(userNoticeConfigBO.getUserCode());
                                                userNoticeConfig.setOrderNoticeStatus(userNoticeConfigBO.getOrderNoticeStatus());
                                                userNoticeConfig.setServerNoticeStatus(userNoticeConfigBO.getServerNoticeStatus());
                                                userNoticeConfig.setAccountNoticeStatus(userNoticeConfigBO.getAccountNoticeStatus());
                                                userNoticeConfig.setLogisticsNoiceStatus(userNoticeConfigBO.getLogisticsNoiceStatus());
                                                userNoticeConfig.setMemberNoticeStatus(userNoticeConfigBO.getMemberNoticeStatus());
                                                userNoticeConfig.setActivityNoticeStatus(userNoticeConfigBO.getActivityNoticeStatus());
                                                userNoticeConfig.setCreateTime(userNoticeConfigBO.getCreateTime());
                                                userNoticeConfig.setUpdateTime(userNoticeConfigBO.getUpdateTime());
                            return userNoticeConfig;
    }
}
